package com.kingyea.mobilepolice.apimanage.serviceinfo.service;

import com.kingyea.mobilepolice.apimanage.serviceinfo.bean.ServiceInfo;
import com.kingyea.mobilepolice.apimanage.serviceinfo.vo.ServiceInfoVO;
import com.kingyea.mobilepolice.apimanage.utils.page.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * @author Mr.Lin
 * @version v1.0.0
 * @description ServiceInfo 接口
 * @date Created in 2018-03-02 16:37:14
 */
public interface ServiceInfoService {

    /**
     * 通过ID查找对象
     *
     * @param id
     * @return
     */
    ServiceInfo getById(Integer id) throws Exception;

    ServiceInfo getBySerialNo(String serialNo) throws Exception;

    /**
     * 列表
     *
     * @param serviceInfo
     * @return
     */
    List<ServiceInfo> list(ServiceInfo serviceInfo) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(Integer id) throws Exception;

    /**
     * 添加
     *
     * @param serviceInfo
     * @return
     */
    ServiceInfo save(ServiceInfo serviceInfo) throws Exception;

    /**
     * 添加
     *
     * @param serviceInfoVO
     * @return
     */
    ServiceInfo saveVO(ServiceInfoVO serviceInfoVO) throws Exception;

    /**
     * 更新
     *
     * @param serviceInfo
     * @return
     */
    ServiceInfo update(ServiceInfo serviceInfo) throws Exception;

    PageInfo<ServiceInfoVO> searchByCondition(Map<String, Object> map) throws Exception;

    /**
     * 上下线、禁用启用
     *
     * @param map
     * @return int
     * @author Mr.Lin
     * @date 2018/3/5 9:23
     */
    int changeOnLineStatus(Map<String, Object> map);

    /**
     * 更新
     *
     * @param serviceInfoVO
     * @return
     */
    Object updateVO(ServiceInfoVO serviceInfoVO) throws Exception;

    /**
     * 审核
     */
    Object check(Map<String, Object> map) throws Exception;

    /**
     * 带条件统计接口数量
     *
     * @param map
     * @return java.lang.Integer
     * @author Mr.Lin
     * @date 2018/3/23 10:40
     */
    Integer countByCondition(Map<String, Object> map);

    /**
     * 每个接口的总调用次数列表
     *
     * @param map
     * @return
     */
    Object countAllService(Map<String, Object> map) throws Exception;

    /**
     * 每个接口今日调用次数列表
     *
     * @param map
     * @return
     */
    Object countTodayService(Map<String, Object> map) throws Exception;

    /**
     * 每个网络各种统计
     *
     * @param map
     * @return
     */
    Object serviceInfoCountByLoction(Map<String, Object> map) throws Exception;

    void requesterCountTask(Map<String, Object> map);

    /**
     * 根据ID 获取完整接口对象，包括出入参数
     *
     * @param id
     * @return com.kingyea.mobilepolice.apimanage.serviceinfo.vo.ServiceInfoVO
     * @author Mr.Lin
     * @date 2018/5/5 18:15
     */
    ServiceInfoVO getFullVoById(Integer id);

    /**
     * 根据搜索条件搜索接口和提供方列表
     *
     * @param map
     * @return java.lang.Object
     * @author Mr.Lin
     * @date 2018/5/22 22:19
     */
    Object searchServiceAndProvider(Map<String, Object> map) throws Exception;
}
